package org.devside.grails.mailqueue

import org.codehaus.groovy.grails.commons.ConfigurationHolder

/**
 * 邮件消息
 * @author zjumty@gmail.com
 * Date: 2010-6-2
 */
class MailMessage {
    String to;

    String subject;

    String replyTo;

    String body;

    boolean multipart = false;

    byte[] attachBytes;

    String contentType;

    String filename;

    String getFrom() {
        return ConfigurationHolder.config.grails.mail.default.from;
    }


    public String toString() {
        final StringBuilder sb = new StringBuilder();
        sb.append("MailMessage");
        sb.append("{to='").append(to).append('\'');
        sb.append(", subject='").append(subject).append('\'');
        sb.append(", replyTo='").append(replyTo).append('\'');
        sb.append(", multipart=").append(multipart);
        sb.append('}');
        return sb.toString();
    }
}
